package org.jeecg.modules.health_records.health_news.service.impl;

import org.jeecg.modules.health_records.health_news.entity.HealthNewsInfo;
import org.jeecg.modules.health_records.health_news.mapper.HealthNewsInfoMapper;
import org.jeecg.modules.health_records.health_news.service.IHealthNewsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Description: 健康资讯知识表
 * @Author: jeecg-boot
 * @Date:   2025-07-02
 * @Version: V1.0
 */
@Service
public class HealthNewsInfoServiceImpl extends ServiceImpl<HealthNewsInfoMapper, HealthNewsInfo> implements IHealthNewsInfoService {

    @Autowired
    private HealthNewsInfoMapper healthNewsInfoMapper;
    /**按recordid查询**/
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<HealthNewsInfo> queryByRecordId(HealthNewsInfo healthNewsInfo) {
        return healthNewsInfoMapper.queryByRecordId(Long.valueOf(healthNewsInfo.getRecordid()), healthNewsInfo.getIdNumber());

    }
}
